package me.zhengjie.modules.web.domain.course;

import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import lombok.Data;
import me.zhengjie.modules.web.domain.pay.OrderSubmitRequest;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author 王宇
 */
@Data
public class CourseDetailResp {

    @ApiModelProperty(value = "课程ID")
    private Long courseId;
    @ApiModelProperty(value = "课程编号")
    private String courseNo;

    @ApiModelProperty(value = "课程名称")
    private String name;
    private String title;
    private String subTitle;
    @ApiModelProperty(value = "课程封面图片")
    private String courseCover;
    @ApiModelProperty(value = "课程价格")
    private BigDecimal price;
    @ApiModelProperty(value = "折扣价")
    private BigDecimal discountPrice;
    @ApiModelProperty(value = "开班时间")
    private String openTime;
    @ApiModelProperty(value = "班级名称")
    private String className;
    @ApiModelProperty(value = "班级编号")
    private String classNo;
    @ApiModelProperty("课程介绍")
    private String courseText;

    @ApiModelProperty(value = "评论列表")
    List<CourseComment> commentList;

    @ApiModelProperty(value = "目录列表")
    List<CourseCatalog> catalogList;

    @ApiModelProperty(value = "是否已支付，true：已支付，false：未支付")
    private boolean hasPaid;

    @ApiModelProperty(value = "餐费")
    private BigDecimal meals;

    @ApiModelProperty(value = "餐费是否已缴纳，true：已支付，false：未支付")
    private boolean mealsPaid;

    @ApiModelProperty(value = "课程类别；1视频/2音频/3文件")
    private Integer category;

    @ApiModelProperty(value = "0：线上，1：线下")
    private Integer platform;

    @ApiModelProperty(value = "是否需要报名，true：需要，false：不需要")
    private boolean needApplicants;

    @ApiModelProperty(value = "报名人列表")
    private List<CourseApplicantsResp> applicantsList;

    @ApiModelProperty(value = "是否显示价格，true：显示，false：不显示")
    private boolean showPrice =  true;

    @ApiModelProperty(value = "是否显示报名，true：显示，false：不显示")
    private boolean showApplicants =  true;

    @Data
    public static class CourseApplicantsResp{

        /**
         * 主键ID
         */
        private String id;
        /**
         * 真实姓名
         */
        private String realName;
        /**
         * 手机号
         */
        private String mobile;
        /**
         * 是否本人
         */
        private boolean self;
        /**
         * 是否支付
         */
        private boolean paid;
        /**
         * 是否核销
         */
        private boolean consume;
    }

    @Data
    public static class CourseComment{
        private String createTime;
        private String openId;
        private String name;
        private String headPic;
        private String identity;
        private String comment;
    }

    @Data
    public static class CourseCatalog{
        private Long itemId;
        private String title;
        private String url;
        @ApiModelProperty(value = "时长")
        private String duration;
        @ApiModelProperty(value = "是否可试看，0：不可，1：可以")
        private Integer viewStatus;
    }
}

